package com.ruoyi.project.distribute.mapper;

import com.ruoyi.project.distribute.domain.HosDocumentmsg;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 */
public interface HosDocumentmsgMapper
{
    /**
     * 查询单据信息详细信息
     *
     * @return
     */
    List<HosDocumentmsg> selectHosDocumentmsgList(String documentlogId);

    /**
     * 单据信息表添加药品信息
     *
     * @return
     */
    int insertDocumentMsgByDocumentMsgIdAndDrugId(HosDocumentmsg hosDocumentmsg);

    /**
     * 单据信息表添加之前先判断 药品信息是否存在
     *
     * @return
     */
    int selectDocumentMsgByDocumentMsgIdAndDrugId(@Param("documentlogId") String documentlogId,@Param("drugId") Long drugId);

    /**
     * 单据信息表添加之前先判断 药品信息是否存在
     *
     * @param documentlogId
     * @param drugId
     * @return
     */
    HosDocumentmsg selectDocumentMsgByDocumentMsgIdAndDrugIdList(@Param("documentlogId") String documentlogId,@Param("drugId") Long drugId);

    /**
     * 删除单据 ID 信息表中 药品信息
     *
     * @param documentlogId
     * @param drugId
     * @return
     */
    int deleteHosDocumentMsgByDocumentMsgIdAndDrugId(@Param("documentlogId")String documentlogId,@Param("drugId") Long drugId);

}
